const registerRouter = require('./backend/router')
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin

module.exports = {
  css: {
    loaderOptions: {
      scss: {
        prependData: `
          @import '~@/assets/scss/variable.scss';
          @import '~@/assets/scss/mixin.scss';
        `
      }
    }
  },

  devServer: {
    before(app) {
      registerRouter(app)
    },
    port: 8800
  },

  configureWebpack(config) {
    // if (process.env.NODE_ENV === 'production') {
    //   config.plugins.push(new BundleAnalyzerPlugin())
    // }
  },

  productionSourceMap: false
}
